package com.jdpu.common.param.admin.question;

import lombok.Data;

import javax.validation.Valid;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.util.List;

/**
 *  前端传参VM
 *  表：t_question
 */
@Data
public class QuestionEditRequestVM {
    private Integer id; //question id
    @NotNull
    private Integer questionType;// 1.单选题  2.多选题  3.判断题 4.填空题 5.简答题
    @NotNull
    private Integer subjectId; // 学科
    @NotBlank
    private String title;

    private Integer gradeLevel; // 级别 年级

    @Valid
    private List<QuestionEditItemVM> items;
    @NotBlank
    private String analyze;

    private List<String> correctArray; // 正确答案 array

    private String correct; // 正确答案 eg.: A,B,C,D
    @NotBlank
    private String score; // 题目总分(千分制)

    // @Range(min = 1, max = 5, message = "请选择题目难度")
    private Integer difficult; // 题目难度

    private Integer itemOrder;
}
